package com.miage.pki.form;

public class UserModify {
    String password, passconfirm, username;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassconfirm() {
        return passconfirm;
    }

    public void setPassconfirm(String passconfirm) {
        this.passconfirm = passconfirm;
    }
    
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public boolean passwordComplete(){
        return (password != null && passconfirm != null && !password.equals("") && password.equals(passconfirm));
    }
    
    public boolean okPassword(){
        return (password.matches("((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@!#$%]).{8,20})"));
    }
    
}
